# Set the minimum version of CMake that can be used
# To find the cmake version run
# $ cmake --version
cmake_minimum_required(VERSION 3.5)

# Set the project name
project(leveldb_demo)

# 启用 C++11 特性和 -pthread 选项
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

# Create a sources variable with a link to all cpp files to compile
set(SOURCES
    delta_compress.cpp
)

# Add an executable with the above sources
add_executable(leveldb_demo ${SOURCES})

# 指定库文件名称和路径
set(LEVELDB_LIB_PATH "/home/baichao/code/vernox/vernox/vernoxcore/leveldb/build/libleveldb.a")

# 链接静态库文件到可执行文件
target_link_libraries(leveldb_demo ${LEVELDB_LIB_PATH})

# 查找并加载系统中的 UUID 库
find_library(UUID_LIBRARY uuid)
# 链接 UUID 库
target_link_libraries(leveldb_demo ${UUID_LIBRARY})

# Set the directories that should be included in the build command for this target
# when running g++ these will be included as -I/directory/path/
target_include_directories(leveldb_demo
    PRIVATE
    "/home/baichao/code/vernox/vernox/vernoxcore/leveldb/include"
    "/home/baichao/code/vernox/vernox/vernoxcore/"
)
